﻿@keyframes fade {
  from {
    opacity: 0;
  }
}

@keyframes fade-out {
  to {
    opacity: 0;
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(200px);
  }
}

@keyframes fadeOutRight {
  to {
    opacity: 0;
    transform: translateX(200px);
  }
}

@keyframes guttersFade {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
}

@keyframes window-in {
  0% {
    transform: scale(0.9) translateZ(0);
    opacity: 0;
  }
}

@keyframes window-out {
  100% {
    transform: scale(0.9) translateZ(0);
    opacity: 0;
  }
}

* {
  --mainfont: sans-serif;
  --quick: #ea6725;
}

html {
  background: var(--background) !important;
}

.term * {
  --mainfont: monospace;
}

* {
  font-family: var(--mainfont);
  -webkit-tap-highlight-color: #0000;
}

*:focus {
  outline: none;
}

::selection {
  background-color: var(--selection) !important;
}

body,
html,
.CodeMirror,
.cm-comment,
.CodeMirror-selected {
  transition: background 0.3s;
}

.CodeMirror-gutter,
#tip {
  transition: all 0.3s;
}

.CodeMirror-scroll {
  transition: color 0.3s;
  text-align: justify;
}

.sidebar {
  transition: all 0.3s, left 0.5s cubic-bezier(0.16, 1, 0.29, 0.99);
  line-height: 1.5rem;
}

html {
  height: 100%;
  overflow: hidden;
}

*::selection {
  background-color: var(--selection) !important;
}

body {
  position: fixed;
  top: calc(10vh + 40px);
  bottom: 10vh;
  left: 6vw;
  right: 6vw;
  margin: 0;
}

#ctn,
#ctn > form {
  height: 100%;
  width: 100%;
  user-select: none;
  position: absolute;
  top: 0;
  left: 0;
}

.CodeMirror {
  line-height: 35px;
  font-family: var(--mainfont), monospace;
  font-size: 20px;
  background: transparent;
  overflow: hidden;
}

a {
  color: #aaa;
  text-decoration: none;
}

#header {
  background: var(--darkback);
  position: fixed;
  top: 0;
  left: 0;
  height: 40px;
  z-index: 1010;
  width: 100%;
  transition: all 0.2s, opacity 1s;
  -webkit-app-region: drag;
  user-select: none;
}

#header:hover {
  transition: all 0.3s, opacity 0.2s;
  box-shadow: rgba(0, 0, 0, 0.18) 0 3px 15px !important;
}

#title {
  color: var(--main);
  font-size: 19px;
  font-weight: bold;
  line-height: 40px;
  margin-left: 2%;
  margin-right: 0;
  width: 120px;
  text-align: center;
  transition: opacity 0.1s;
  -webkit-app-region: no-drag;
  position: fixed;
  left: 0;
  top: 0;
}

#title:after {
  content: "";
  background: var(--main);
  height: 2.3px;
  width: 0px;
  position: absolute;
  bottom: 8px;
  left: 2%;
  transition: all 0.3s;
}

#title:hover:after {
  width: 115px;
}

#title:hover:active:after {
  width: 80px;
  transform: translateX(20px);
}

#top_file_name {
  line-height: 40px;
  font-weight: bold;
  color: var(--active);
  width: 56%;
  padding: 0 22%;
  height: 40px;
  overflow: hidden;
  text-align: center;
  position: fixed;
  top: 0;
  left: 0;
  transition: all 0.3s;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#top_file_name.local:after {
  content: "LOCAL";
  font-size: 10px;
  border-radius: 3px;
  background: #8883;
  color: var(--active);
  padding: 3px 5px;
  display: inline-block;
  line-height: 10px;
  height: 10px;
  margin-left: 5px;
  transform: translateY(-3px);
  transition: color 0.3s;
}

#btns {
  float: right;
  height: 40px;
  -webkit-app-region: no-drag;
  position: fixed;
  right: 0;
  top: 0;
}

#btns .cornerbtn {
  display: inline-block;
  width: 60px;
  height: 100%;
  background-repeat: no-repeat;
  background-position: 50% 50%;
  transition: all 0.2s;
}

#btns .cornerbtn:hover {
  background-color: var(--line);
}

#btns .cornerbtn:hover:active {
  background-color: var(--shadow);
}

#btns #close:hover {
  background-color: #e81123;
  background-image: url("close-white.svg");
}

#btns #close:hover:active {
  background-color: #f1707a;
  background-image: url("close-white.svg");
}

#btns #minimize {
  background-image: url("minimize.svg");
  background-size: 12px 3px;
}

#btns #maxmize {
  background-image: url("maxmize.svg");
  background-size: 12px 12px;
}

#btns #fullscreen {
  background-image: url("fullscreen.svg");
  background-size: 13px 13px;
}

#btns #close {
  background-image: url("close.svg");
  background-size: 13px 13px;
}

#topbar {
  position: fixed;
  top: 40px;
  left: 0;
  padding: 0 2%;
  width: 96%;
  background: var(--darkback);
  box-shadow: rgba(0, 0, 0, 0.18) 0 3px 15px;
  height: 40px;
  opacity: 0;
  color: var(--active);
  transition: all 0.2s, opacity 1s;
  z-index: 998;
  user-select: none;
}

#topbar + #header {
  box-shadow: rgba(0, 0, 0, 0.18) 0 3px 15px;
}

#topbar:hover + #header {
  box-shadow: none;
  opacity: 1 !important;
  transition: all 0.3s, opacity 0.2s;
}

#topbar:hover {
  opacity: 1;
  transition: all 0.3s, opacity 0.2s;
}

button img {
  transform: translateY(-1px);
}

#topbar * {
  vertical-align: middle;
}

#topbar .whole {
  margin: 0;
  padding: 0;
  display: inline-block;
  white-space: nowrap;
  margin-left: 10px;
  transition: all 0.3s;
}

#topbar .whole:hover {
  background: var(--line);
}

.group-title {
  font-size: 16px;
  font-weight: bold;
  line-height: 40px;
  padding-left: 10px;
  display: inline-block;
  transition: background 0.3s;
}

#settings {
  user-select: none;
}

#topbar button {
  font-size: 14px !important;
}

#topbar button,
#topbar #save_btn,
#settings button {
  background: var(--background);
  color: var(--active);
  border-radius: 3px;
  border: none;
  box-shadow: rgba(0, 0, 0, 0.18) 2px 0 7px;
  text-align: center;
  margin: 0 4px;
  outline: none;
  line-height: 20px;
  font-size: 13px;
  transition: all 0.2s;
}

#settings strong {
  display: block;
  background: var(--quick);
  color: #fff;
  box-shadow: #0003 0 5px 15px;
  padding: 10px;
  margin: 10px 0;
  border-radius: 5px;
}

#topbar button,
#topbar #save_btn,
#settings button {
  padding: 5px 13px;
}

#topbar button:hover,
#topbar #save_btn:hover,
#settings button:hover,
#tool_bar button:hover {
  box-shadow: rgba(0, 0, 0, 0.18) 2px 5px 13px;
  filter: brightness(var(--lighter));
}

#topbar button:hover:active,
#topbar #save_btn:hover:active,
#settings button:hover:active,
#tool_bar button:hover:active {
  filter: brightness(var(--darker));
  transition: all 0.1s;
  box-shadow: #0000 0 0 0, #0003 0 5px 15px inset;
}

#settings > i {
  font-size: 30px;
  margin-top: 60px;
  transition: color 0.3s;
}

#settings h1 {
  margin-top: -41px;
  margin-left: 45px;
}

#settings div i {
  color: var(--active);
  font-size: 20px;
  margin-top: 20px;
  transition: color 0.3s;
}

#settings h2 {
  margin-top: -26px;
  margin-left: 36px;
}

.sidebar h1,
#preview_box h1 {
  font-size: 35px;
}

#settings > div:nth-last-child(1) {
  margin-bottom: 50px;
}

#settings > div > div {
  height: 40px;
}

#settings > div > div * {
  vertical-align: middle;
}

#settings button {
  float: right;
}

#settings span {
  transition: color 0.3s;
}

#topbar .save {
  float: right;
  margin-right: 1%;
  height: 40px;
  white-space: nowrap;
}

#topbar #save_info {
  display: inline-block;
  position: absolute;
  top: 2px;
  right: 100px;
  line-height: 40px;
  color: #aaa;
  vertical-align: middle;
}

#topbar #save_btn {
  position: absolute;
  top: 5px;
  right: 3px;
  display: inline-block;
  height: 20px;
  width: 80px;
  padding: 5px 0;
  vertical-align: middle;
}

#topbar .group {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  transition: all 0.3s;
  padding: 5px 0;
  width: 0;
  opacity: 0;
  vertical-align: middle;
}

#topbar span:hover + .group,
#topbar .group:hover {
  width: auto;
  padding: 5px 10px;
  overflow: visible;
  opacity: 1;
}

#stick {
  margin-left: 20px;
  line-height: 40px;
}

.sidebar {
  position: fixed;
  left: -28rem;
  top: 40px;
  height: calc(100% - 40px);
  width: 22rem;
  color: #888;
  padding: 0 2rem;
  box-shadow: rgba(0, 0, 0, 0.2) 0 0 20px;
  background: var(--darkback);
  overflow: auto;
  z-index: 999;
  overflow-wrap: break-word;
  display: none;
  color: rgba(0, 0, 0, 0);
}

.sidebar:hover {
  color: var(--scroll);
}

::-webkit-scrollbar,
::-webkit-scrollbar-thumb {
  width: 26px !important;
  border-radius: 13px !important;
  background-clip: padding-box;
  border: 10px solid transparent !important;
  cursor: default;
}

::-webkit-scrollbar-thumb {
  box-shadow: inset 0 0 0 10px !important;
}

.sidebar > * {
  color: var(--active);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--main) !important;
  text-shadow: var(--shadow) 0 1px 5px;
  font-weight: bold;
  transition: all 0.3s;
}

#about h2,
.markdown-body h2,
h3,
h4,
h5,
h6 {
  line-height: 40px;
}

h1 {
  font-size: 29px;
  margin-top: 50px;
  line-height: 50px;
}

h1 a {
  transition: all 0.3s;
}

h2 {
  font-size: 28px;
}
h3 {
  font-size: 26px;
}
h4 {
  font-size: 24px;
  margin: 20px 0;
}
h5 {
  font-size: 22px;
  margin: 15px 0;
}
h6 {
  font-size: 20px;
  margin: 10px 0;
}

blockquote p {
  border-left: var(--shadow) 4px solid;
  padding-left: 10px;
}

.cover {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: var(--shadow);
  z-index: 998;
  display: none;
  animation: fade 0.3s;
  transition: all 0.3s;
}

.msgbox {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  margin: auto;
  z-index: 998;
  background: var(--darkback);
  border-radius: 3px;
  padding: 5.5rem 2rem 4rem 2rem;
  box-shadow: rgba(0, 0, 0, 0.3) 0 5px 15px;
  animation: window-in 0.5s cubic-bezier(0.16, 1, 0.29, 0.99) backwards;
  color: #0000;
  transition: color 0.3s;
}

.msgbox:hover {
  color: var(--scroll);
}

.msgbox #box_title {
  margin-top: 0;
  position: absolute;
  top: 2rem;
  left: 2rem;
  color: var(--active) !important;
  transition: color 0.3s;
  user-select: none;
}

.msgbox #content {
  line-height: 1.7rem;
  font-size: 20px;
  overflow: auto;
  height: 100%;
  padding-bottom: 1rem;
  overflow-x: hidden;
}

#change_log * {
  color: var(--active);
}

.markdown-body * {
  max-width: 100%;
}

.markdown-body img {
  border-radius: 4px;
  box-shadow: #0003 0 5px 15px;
  margin: 20px 15px;
  max-width: calc(100% - 30px);
}

.markdown-body .emoji {
  width: 18px;
  height: 18px;
  box-shadow: none;
  border-radius: 0;
  margin: 0;
}

.markdown-body .linenums {
  overflow: auto;
}

a[href] img {
  margin: 0 !important;
}

pre.linenums {
  box-shadow: #0003 0 5px 15px;
  background: var(--background);
  padding: 6px;
  border-radius: 5px;
}

ol.linenums {
  list-style: none;
  counter-reset: sectioncounter;
  margin: 0;
  padding: 0;
  padding: 14px;
}

ol.linenums::-webkit-scrollbar {
  height: 6px;
}

ol.linenums::-webkit-scrollbar-thumb {
  background: #8883;
}

ol.linenums::-webkit-scrollbar-thumb:hover {
  background: #8885;
}

ol.linenums::-webkit-scrollbar-thumb:active {
  background: #8882;
}

ol.linenums li:before {
  content: counter(sectioncounter);
  counter-increment: sectioncounter;
  display: inline-block;
  width: 20px;
  text-align: right;
  padding: 0 10px 0 0;
  font-family: monospace;
  opacity: 0.8;
}

#preview_box {
  font-size: 18px;
  line-height: 30px;
  color: var(--active);
  padding: 0 25px;
}

.markdown-body blockquote {
  color: #888;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  position: relative;
}

.markdown-body h1:before,
.markdown-body h2:before,
.markdown-body h3:before,
.markdown-body h4:before,
.markdown-body h5:before,
.markdown-body h6:before {
  content: "H1";
  position: absolute;
  left: -25px;
  font-size: 14px;
  opacity: 0;
  transform: translateX(15px) scale(0.7);
  transition: all 0.3s;
}

.markdown-body h1:hover:before,
.markdown-body h2:hover:before,
.markdown-body h3:hover:before,
.markdown-body h4:hover:before,
.markdown-body h5:hover:before,
.markdown-body h6:hover:before {
  opacity: 1;
  transform: none;
}

.markdown-body h1:before {
  content: "H1";
}
.markdown-body h2:before {
  content: "H2";
}
.markdown-body h3:before {
  content: "H3";
}
.markdown-body h4:before {
  content: "H4";
}
.markdown-body h5:before {
  content: "H5";
}
.markdown-body h6:before {
  content: "H6";
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 25px;
}

.task-list-li {
  margin-left: -1/5px;
}

input[type="checkbox"] {
  margin-left: -27px;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--background);
  border-radius: 2px;
  position: relative;
  top: 6px;
  box-shadow: #0003 0 3px 8px;
}

input[type="checkbox"]:before,
input[type="checkbox"]:after {
  content: "";
  position: absolute;
  background: var(--main);
}

input[type="checkbox"]:checked:disabled:before {
  width: 2px;
  height: 6px;
  transform: rotate(-45deg);
  top: 8px;
  left: 4px;
}

input[type="checkbox"]:checked:disabled:after {
  width: 2px;
  height: 12px;
  transform: rotate(45deg);
  top: 3px;
  left: 10px;
}

#content::-webkit-scrollbar-track:hover {
  background: #00000005;
  border-radius: 13px;
}

#content #box {
  width: 25rem;
  height: 13rem;
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--background);
  transform: translate(-50%, -50%);
  margin: 0;
  text-align: center;
  font-size: 20px;
  line-height: 13rem;
  display: block;
  opacity: 0;
  box-shadow: var(--shadow) 0 5px 20px;
  transition: all 0.3s;
  user-select: none;
}

.msgbox #content p {
  margin-top: 0;
}

.msgbox #msg_close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  user-select: none;
  width: 20px;
  height: 20px;
  transition: all 0.2s;
}

.msgbox #msg_close:hover {
  filter: brightness(2);
}

.msgbox #msg_close:hover:active {
  filter: brightness(0.8);
  transition: all 0.1s;
}

#msg_close:before,
#msg_close:after {
  content: "";
  position: absolute;
  background: #f03a17;
  width: 3px;
  border-radius: 2px;
  height: 20px;
  left: 7px;
}

#msg_close:before {
  transform: rotate(45deg);
}

#msg_close:after {
  transform: rotate(-45deg);
}

.msgbox #description {
  color: #888;
  display: block;
  font-size: 16px;
  text-align: center;
  margin: 7rem 0.6rem;
  transition: color 0.3s;
  user-select: none;
}

#content > ul {
  padding: 0;
  margin: 0;
  user-select: none;
  color: #888;
}

#content > ul > li {
  list-style: none;
  height: 3rem;
  line-height: 3rem;
  border-bottom: solid 1.5px var(--line);
  transition: all 0.2s;
  padding: 0 1rem;
  overflow: hidden;
  cursor: default;
}

#content > ul > li > span {
  opacity: 0;
  font-size: 13px;
  transition: opacity 0.2s;
  margin-right: 5px;
  transition: all 0.2s;
}

#content > ul > li > span:hover {
  filter: brightness(1.3);
}

#content > ul > li > span:hover:active {
  filter: brightness(0.9);
}

@keyframes shake {
  0%,
  50% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-7px);
  }
  75% {
    transform: translateX(7px);
  }
}

#content > ul > li a {
  color: var(--active);
  transition: color 0.2s;
  display: inline-block;
  height: 100%;
  width: calc(100% - 15px);
  margin-left: -2rem;
  transition: all 0.3s;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

#content > ul > li:hover {
  background: var(--background);
}

#content > ul > li:hover span {
  opacity: 1;
}

#content > ul > li:hover a {
  margin-left: 0;
  width: calc(100% - 50px);
}

#content > ul > li:hover:active {
  background: var(--line);
}

#content > ul > li * {
  vertical-align: middle;
}

#content > ul > li > .ensure_del {
  color: var(--active);
  font-size: 16px;
  opacity: 1;
  animation: shake 0.1s;
  animation-iteration-count: 5;
  display: inline-block;
}

#content ul #new,
#content ul #quick_note {
  height: 2rem;
  line-height: 2rem;
  font-size: 16px;
}

#content ul #new {
  color: var(--main);
}

#content ul #quick_note {
  color: var(--quick);
}

#content form {
  display: inline-block;
  height: 3rem;
}

.tips {
  position: fixed;
  bottom: 10%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 999;
  padding: 0.6rem 1.3rem;
  border-radius: 3px;
  color: var(--active);
  background: var(--line);
  font-size: 16px;
  animation: fade 0.6s;
  transition: all 0.3s;
  box-shadow: #0003 0 8px 20px;
  user-select: none;
}

.fname_box {
  border: none;
  color: var(--active);
  border-bottom: #0000 solid 3px;
  font-size: 16px;
  padding: 0.3rem;
  margin: 0.3rem 0.6rem;
  background: var(--background);
  box-shadow: var(--shadow) 0px 3px 10px;
  transition: all 0.3s;
}

.fname_box:hover {
  box-shadow: var(--shadow) 0px 10px 15px;
}

.fname_box:focus {
  border-bottom: var(--main) solid 3px;
  box-shadow: var(--shadow) 0px 10px 15px;
}

#content button,
#content > span {
  animation: fade 0.3s;
}

.msgbox button,
input#file-upload-button {
  background: var(--main);
  color: #fff;
  font-size: 16px;
  border-radius: 3px;
  border: none;
  box-shadow: rgba(0, 0, 0, 0.18) 2px 0 10px;
  padding: 0.3rem 1rem;
  text-align: center;
  margin: 5px 0.6rem;
  outline: none;
  line-height: 20px;
  user-select: none;
  transition: all 0.2s;
}

.msgbox button:hover {
  box-shadow: rgba(0, 0, 0, 0.18) 2px 5px 13px;
  filter: brightness(var(--lighter));
}

.msgbox button:hover:active {
  filter: brightness(var(--darker));
  transition: all 0.1s;
  box-shadow: #0000 0 0 0, #0003 0 5px 15px inset;
}

.choose ul {
  padding: 0;
}

.choose ul li {
  color: var(--active);
  list-style: none;
  font-size: 16px;
  border-bottom: solid 1.5px var(--line);
  cursor: default;
  transition: all 0.2s;
  line-height: 3rem;
  user-select: none;
}

.choose ul li:hover {
  background: var(--background);
}

.choose ul li:hover:active {
  background: var(--line);
}

code {
  background: var(--com);
  border-radius: 3px;
  padding: 0 7px;
}

@keyframes rmenu {
  from {
    width: 0;
    height: 0;
  }
}

@keyframes rmenu-out {
  to {
    width: 0;
    height: 0;
  }
}

#Rmenu {
  position: fixed;
  background: var(--background);
  animation: rmenu 0.3s cubic-bezier(1, 0, 0, 1);
  box-shadow: rgba(0, 0, 0, 0.2) 0 5px 15px;
  border-radius: 3px;
  padding: 5px 0;
  display: none;
  z-index: 9999;
  user-select: none;
  font-size: 15px;
  width: 200px;
  height: 408.8px;
  overflow: hidden;
}

#Rmenu ul {
  padding: 0;
  margin: 0;
  width: 200px;
}

#Rmenu ul li {
  line-height: 33px;
  color: var(--active);
  margin: 0;
  list-style-type: none;
  cursor: default;
  transition: all 0.15s;
  padding: 0 15px;
}

#Rmenu ul li a {
  color: var(--active);
}

#Rmenu ul li:hover {
  background-color: var(--com);
}
#Rmenu ul li:hover:active {
  background: var(--line) !important;
}
#Rmenu ul li span {
  font-size: 13px;
  color: #888;
  float: right;
}

#Rmenu i {
  opacity: 0.8;
  width: 16px;
  margin-right: 10px;
  text-align: center;
}

#Rmenu li i {
  transition: opacity 0.2s;
}

#Rmenu li:hover i {
  opacity: 1;
}

#Rmenu li:active i {
  opacity: 0.5;
}

table {
  border-width: 4px;
  border-color: var(--line);
  border-collapse: collapse;
}

table th {
  border-width: 2px;
  padding: 8px;
  border-style: solid;
  border-color: var(--line);
  background-color: var(--background);
}

table td {
  border-width: 2px;
  padding: 8px;
  border-style: solid;
  border-color: var(--line);
}

table tr:nth-child(odd) {
  background: #fff3;
}

table tr:nth-child(even) {
  background: #00000005;
}

table th,
table td {
  padding: 5px 12px;
}

.file {
  height: 32px;
  width: 32px;
  border-radius: 50%;
  display: inline-block;
  margin: 0 10px;
  line-height: 32px;
  text-align: center;
  font-size: 19px;
  font-weight: bold;
}

code,
code * {
  font-family: monospace, var(--mainfont) !important;
}

.linenums code {
  background: none;
}

.kwd,
.tag {
  color: #dc3939;
  font-weight: bold;
}

.lit {
  color: #46a609;
}

.pun {
  color: #999;
}

.com,
.atn {
  color: #21a366;
  font-weight: bold;
}

.str,
.atv {
  color: #d68f29;
}

button.on,
button.off {
  transform: none !important;
  height: 12px;
  width: 30px;
  border-radius: 12px !important;
  position: relative;
  margin-top: 6px !important;
  margin-right: 9px !important;
}

button.off {
  background: var(--line);
}

button.on:before,
button.off:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  border-radius: 100%;
  top: -4px;
  box-shadow: #0003 0 5px 10px;
  transition: all 0.3s cubic-bezier(0, 0.48, 0.27, 0.98);
}

button.on:hover,
button.off:hover {
  filter: brightness(1.1);
}
button.on:hover:active,
button.off:hover:active {
  filter: brightness(0.8);
  transition: all 0.1s;
}

button.off {
  filter: brightness(0.95);
}

button.on:before {
  left: 16px;
  background: var(--main);
}

button.off:before {
  left: -4px;
  background: #888;
}

#settings input[type="range"] {
  -webkit-appearance: none;
  background: var(--darkback);
  width: 80%;
  height: 8px;
  border-radius: 6px;
  box-shadow: #0003 0 5px 10px inset;
  transition: all 0.1s;
}

#settings input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: var(--main);
  border-radius: 50%;
  box-shadow: #0003 0 3px 10px;
  transition: all 0.1s;
}

#settings input[type="range"]::-webkit-slider-thumb:hover {
  filter: brightness(1.1);
}

#settings input[type="range"]:hover:active::-webkit-slider-thumb {
  filter: brightness(0.9);
  box-shadow: #0005 0 0 0;
}

#settings input[type="range"]:disabled {
  filter: brightness(0.8) !important;
  cursor: no-drop;
}

#settings input[type="range"]:disabled + label {
  opacity: 0.5;
  box-shadow: none;
  cursor: no-drop;
}

#settings input[type="range"]:disabled::-webkit-slider-thumb {
  box-shadow: none;
  filter: none !important;
}

#settings input[type="range"] + label {
  background: var(--background);
  width: 50px;
  line-height: 30px;
  text-align: center;
  border-radius: 3px;
  box-shadow: #0003 0 0px 10px;
  transition: all 0.2s;
  margin-left: 6px;
  position: relative;
  font-size: 15px;
  display: inline-block;
}

#settings input[type="range"] + label:before {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border: 8px transparent solid;
  border-right: 8px var(--background) solid;
  top: 6px;
  left: -15px;
}

#settings input[type="range"]:hover + label,
#settings input[type="range"] + label:hover {
  box-shadow: #0003 0 5px 15px;
}

#tool_bar {
  position: absolute;
  right: 2%;
  margin-top: 15px;
  background: var(--darkback);
  border-radius: 3px;
  z-index: 15;
  padding: 0.1em 0.8em;
  overflow: hidden;
  color: inherit;
  box-shadow: var(--shadow) 0 3px 15px;
  color: #999;
  transition: all 0.3s;
  animation: fadeInRight 0.5s cubic-bezier(0, 0.6, 0.06, 0.99);
  cursor: default;
  display: none;
}

#tool_bar button {
  background: var(--background);
  color: var(--active);
  border-radius: 3px;
  border: none;
  box-shadow: rgba(0, 0, 0, 0.18) 2px 0 10px;
  padding: 0.2rem;
  text-align: center;
  margin: 5px 6px;
  outline: none;
  line-height: 20px;
  user-select: none;
  transition: all 0.2s;
  width: 30px;
  line-height: 24px;
  font-size: 12px;
}

#font-manager {
  position: fixed;
  left: 100%;
  top: 100%;
  opacity: 0;
}

.bold * {
  font-weight: bold;
}

#font-manager span {
  font-family: monospace;
  background-image: url(./flag.png);
}

#font-manager a {
  font-family: BASE;
}

#sync_dashboard,
#gitee_sync_dashboard {
  background: var(--background);
  padding: 15px;
  border-radius: 5px;
  box-shadow: var(--shadow) 0 5px 15px;
  margin-bottom: 20px;
  transition: all 0.3s;
}

#sync_dashboard.connected,
#gitee_sync_dashboard.connected {
  height: 96px;
}

#sync_dashboard.unconnected,
#gitee_sync_dashboard.unconnected {
  height: 30px;
}

#sync_dashboard button,
#gitee_sync_dashboard button {
  float: none;
}

#sync_dashboard > *,
#gitee_sync_dashboard > * {
  display: none;
  animation: fade 0.3s;
}

#sync_dashboard.unconnected #sync_start_btn,
#gitee_sync_dashboard.unconnected #gitee_sync_start_btn,
#sync_dashboard.connected #sync,
#gitee_sync_dashboard.connected #gitee_sync {
  display: block;
}

img#avatar,
img#gitee_avatar {
  width: 40px;
  margin-right: 10px;
  border-radius: 50%;
  box-shadow: #0003 0 5px 15px;
}

span#username_span,
span#gitee_username_span {
  font-weight: bold;
  font-size: 18px;
  transition: none;
}

#sync > div,
#gitee_sync > div {
  margin: 0 5px 15px 5px;
}

#sync,
#gitee_sync {
  line-height: 40px;
}
#settings i#sign_out_btn,
#settings i#gitee_sign_out_btn {
  color: #888;
  float: right;
  margin: 0;
  font-size: 16px;
  transition: all 0.2s;
}
#settings div i#sign_out_btn:hover,
#settings div i#gitee_sign_out_btn:hover {
  color: #aaa;
}
#settings div i#sign_out_btn:hover:active,
#settings div i#gitee_sign_out_btn:active {
  color: #555;
}

#backup_and_sync ~ div > button {
  float: none;
}

#format_btns {
  display: inline-block;
  margin-left: 20px;
}

#import_list {
  color: var(--active);
}

@keyframes titlebox {
  0%,
  69% {
    opacity: 0;
    transform: translateY(900px);
  }

  70% {
    opacity: 0;
    transform: none;
  }
}

.showTitleBox {
  animation: titlebox 1s;
  transition: opacity 0.2s;
  z-index: 9999;
  background: var(--background);
  color: var(--active);
  padding: 10px 15px;
  box-shadow: #0004 0 3px 15px;
  border-radius: 3px;
  font-size: 14px;
  line-height: 20px;
  max-width: 200px;
  user-select: none;
}

.showTitleBox strong {
  display: block;
  font-size: 16px;
  margin: 10px 0;
}

.showTitleBox span {
  color: #888;
  font-size: 12px;
  display: block;
  margin-top: 6px;
}
#save_info,
#format_btns,
#title,
#save_btn,
#topbar_bold,
#topbar_italic,
#topbar_strikethrough,
#topbar_link {
  animation: fade 0.3s;
}

input[type="text"] {
  caret-color: var(--main);
}

.fad {
  --fa-secondary-color: var(--main);
  --fa-secondary-opacity: 1;
  text-shadow: #0004 0 1px 5px;
}

#change_log {
  font-size: 18px;
  line-height: 30px;
  padding: 10px 25px;
}

#change_log h1 {
  margin-top: 0;
}

#change_log {
  height: calc(100% - 60px);
  overflow: auto;
}

#update_now,
#next_time,
#dont_show_again {
  float: right;
}

#next_time,
#dont_show_again {
  background: var(--background);
  color: var(--active);
}

#dont_show_again {
  opacity: 0.7;
}

button#update {
  float: none !important;
}

#import_list {
  color: var(--active);
}

#current_vertion {
  font-size: 15px;
  display: block;
  margin: 5px 0;
  text-shadow: #0005 0 3px 8px;
}

#current_vertion + div button {
  margin-left: 0;
}

#update.new_ver {
  position: relative;
}

#update.new_ver:after {
  content: "";
  position: absolute;
  background: #e00;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  top: -3px;
  right: -3px;
  box-shadow: #0003 0 2px 5px;
}

kbd {
  background: var(--background);
  padding: 2px 8px;
  border-radius: 3px;
  border: var(--shadow) solid 1px;
  box-shadow: #0002 0 3px 10px;
}

@media screen and (max-height: 640px) {
  @keyframes window-in {
    from {
      transform: translateX(-120vw);
    }
  }
  @keyframes window-out {
    to {
      transform: translateX(-120vw);
    }
  }
  .msgbox {
    width: calc(100vw - 4rem) !important;
    height: calc(100vh - 40px - 9.5rem) !important;
    top: 2.5rem !important;
    border-radius: 0;
  }
}

@media screen and (max-width: 1010px) {
  #save_info {
    display: none !important;
  }
}
@media screen and (max-width: 865px) {
  #topbar_bold,
  #topbar_italic,
  #topbar_strikethrough,
  #topbar_link {
    display: none !important;
  }
}
@media screen and (max-width: 655px) {
  #format_btns {
    display: none !important;
  }
}
@media screen and (max-width: 620px) {
  #title {
    display: none !important;
  }
  #top_file_name {
    text-align: left !important;
    padding-left: 20px;
    width: calc(100vw - 262px);
  }
  @keyframes window-in {
    from {
      transform: translateX(-120vw);
    }
  }
  @keyframes window-out {
    to {
      transform: translateX(-120vw);
    }
  }
  .msgbox {
    width: calc(100vw - 4rem) !important;
    height: calc(100vh - 40px - 9.5rem) !important;
    top: 2.5rem !important;
    border-radius: 0;
  }
}
@media screen and (max-width: 425px) {
  #minimize,
  #maxmize,
  #fullscreen {
    display: none !important;
  }
  #top_file_name {
    width: calc(100vw - 82px);
  }

  .msgbox {
    padding: 5.5rem 1rem 2rem 1rem;
    width: calc(100vw - 3.5rem) !important;
    height: calc(100vh - 7.5rem - 40px) !important;
    right: 1.5rem;
  }

  @keyframes window-in {
    from {
      transform: translateX(-120vw);
    }
  }
  @keyframes window-out {
    to {
      transform: translateX(-120vw);
    }
  }

  #msg_close {
    display: none;
  }
}
@media screen and (max-width: 27rem) {
  .sidebar {
    width: calc(100% - 3rem) !important;
    padding-left: 1rem !important;
    padding-right: 0.5rem !important;
  }
  ::-webkit-scrollbar,
  ::-webkit-scrollbar-thumb {
    width: 5px !important;
    border-radius: 0 !important;
    background-clip: padding-box;
    border: none !important;
    cursor: default;
  }
  .CodeMirror-vscrollbar {
    width: 5px !important;
  }
}

#cover_closed,
#tip_closed {
  animation-name: fade-out !important;
}

#msgbox_closed {
  animation-name: window-out !important;
}

a[href] {
  color: var(--main);
  position: relative;
}

#change_log a[href] {
  color: var(--main);
}

a[href]:before {
  content: "";
  position: absolute;
  background: var(--main);
  opacity: 0.5;
  height: 5px;
  bottom: 0;
  left: -3px;
  right: -3px;
  border-radius: 3px;
  opacity: 0.3;
  transition: all 0.35s cubic-bezier(0, 1, 0, 1);
}

a[href]:after {
  content: "";
  position: absolute;
  left: 0;
  right: -3px;
  top: 0;
  bottom: 0;
  z-index: 1;
}

.markdown-body a[href^="http"]:before,
.markdown-body a[href^="http"]:after {
  right: -24px;
}

a[href]:hover:before {
  height: 100%;
  opacity: 0.15;
}

a[href]:hover:active:before {
  opacity: 0.08;
  transition: all 0.1s;
}

a[href] + i {
  font-size: 15px;
  margin: 0 8px 0 5px;
  opacity: 0.9;
  text-shadow: none;
}
